{% extends "WebMainSiteBundle:User:layout.html.twig" %}
{% set title = "我的试卷" %}
{% block title %}
    {{ title }}
{% endblock %}

{% block user_main %}
    <aside class="col-md-12 message" role="complementary">
        <section class="widget posts">
            <h2 class="yahei">我的试卷</h2>
            <ul>
                {#{{ dump(exam) }}#}
                {% for item in exam %}
                    <li>
                        <div class="manageBox">
                            <a href="">安排考试</a>
                            <a href="">数据统计</a>
                        </div>
                        <div class="manageBox">
                            <a href="{{ path("WebExamAdd",{id:item.id}) }}">修改</a>
                            <a href="{{ path("WebExamQuestionEdit",{'id':item.id}) }}">管理</a>
                        </div>
                        <a href="{{ path("ExamQuestion",{id:item.id}) }}">
                            <h3>
                                <span style="float: right;font-weight: normal">[ {{ item.questionNum }} 题， {{ item.totalScore }} 分, {{ item.totalTime }} 分钟 ]</span>
                                {{ item.title }}
                            </h3>
                            <p>
                                {{ (item.intro|striptags|slice(0,60))}}...
                            </p>
                        </a>
                        <div class="clear"></div>
                    </li>
                {% endfor %}
            </ul>
        </section>
    </aside>
{% endblock %}
{% block myCss %}

{% endblock %}
{% block myJs %}

    <style>
        .clear{clear: both;}

        .message{}
        .message h2{border-bottom: dotted 1px #ccc}
        .message li{border-bottom: solid 1px #ccc;margin-top: 10px}
        .message li h3 span{float: right;}

        .manageBox{float: right; padding: 0 30px;border-left: 1px dotted #DDD;margin-left: 10px;margin-bottom: 10px;}
    </style>
{% endblock %}